package cn.unknowpupil.init.system;

/**
 * Created at 2021/1/7 by w10g <br>
 * Initialize Formular ... <br>
 *
 * @author unknowpupil
 * @since 0.0.1
 */
public class Formular {
    public static void main(String[] args) {

        double x,y,z;
        double a1=2,b1=-3,c1=3,d1=1,a2=-1,b2=2,c2=1,d2=9,a3=0.5,b3=1,c3=2,d3=11;
        x=((d1*c2-d2*c1)*(b2*c3-b3*c2)-(d2*c3-d3*c2)*(b1*c2-b2*c1))/((a1*c2-a2*c1)*(b2*c3-b3*c2)-(a2*c3-a3*c2)*(b1*c2-b2*c1));
        y=((d1*c2-d2*c1)*(a2*c3-a3*c2)-(d2*c3-d3*c2)*(a1*c2-a2*c1))/((a2*c3-a3*c2)*(b1*c2-b2*c1)-(a1*c2-a2*c1)*(b2*c3-b3*c2));
        z=(d1-a1*x-b1*y)/c1;
        System.out.println("the formular answer is: x="+x+" y="+y+" z="+z);

    }

}
